interface Meta {
  id?: number;
  icon?: string;
  hidden?: boolean;
  parent: number;
}

interface RouteType {
  name: string,
  path: string,
  page: string,
  children?: Array<RouteType>,
  meta?: Meta
}

const menuRoutes: Array<any> = [{
  id: 10000,
  name: '待办事项',
}, {
  id: 20000,
  name: '内容管理',
}, {
  id: 30000,
  name: '用户管理',
}, {
  id: 40000,
  name: '系统设置',
}, {
  id: 50000,
  name: '管理员',
}];

const extendRoutes: Array<RouteType> = [
  {
    name: '活动列表',
    path: 'ActivityList',
    page: 'todo/ActivityList',
    meta: {
      icon: 'list',
      hidden: false,
      parent: 10000,
    },
  },
  {
    name: '订单列表',
    path: 'OrderList',
    page: 'todo/OrderList',
    meta: {
      icon: 'shopping-cart',
      hidden: false,
      parent: 10000,
    },
  },
  {
    name: '充值记录',
    path: 'TopupRecord',
    page: 'todo/TopupRecord',
    meta: {
      icon: 'cc-visa',
      hidden: false,
      parent: 10000,
    },
  },
  {
    name: '充值审核',
    path: 'TopupAudit',
    page: 'todo/TopupAudit',
    meta: {
      hidden: true,
      parent: 10000,
    },
  },
  {
    name: '提现管理',
    path: 'Withdraw',
    page: 'todo/Withdraw',
    meta: {
      icon: 'credit-card',
      hidden: false,
      parent: 10000,
    },
  },
  {
    name: '提现审核',
    path: 'WithdrawAudit',
    page: 'todo/WithdrawAudit',
    meta: {
      hidden: true,
      parent: 10000,
    },
  },
  {
    name: '店铺列表',
    path: 'ShopList',
    page: 'todo/ShopList',
    meta: {
      icon: 'institution',
      hidden: false,
      parent: 10000,
    },
  },
  {
    name: '店铺审核',
    path: 'ShopAudit',
    page: 'todo/ShopAudit',
    meta: {
      hidden: true,
      parent: 10000,
    },
  },
  {
    name: '买手列表',
    path: 'BuyerList',
    page: 'todo/BuyerList',
    meta: {
      icon: 'users',
      hidden: false,
      parent: 10000,
    },
  },
  {
    name: '买手审核',
    path: 'BuyerAudit',
    page: 'todo/BuyerAudit',
    meta: {
      hidden: true,
      parent: 10000,
    },
  },
  {
    name: '买手详情',
    path: 'BuyerDetail',
    page: 'todo/BuyerDetail',
    meta: {
      hidden: true,
      parent: 10000,
    },
  },
  {
    name: '推广用户',
    path: 'Promotion',
    page: 'todo/Promotion',
    meta: {
      icon: 'user-plus',
      hidden: false,
      parent: 10000,
    },
  },
  {
    name: '收入明细',
    path: 'Income',
    page: 'todo/Income',
    meta: {
      icon: 'credit-card',
      hidden: false,
      parent: 10000,
    },
  },
  {
    name: '文章分类',
    path: 'ArticleSort',
    page: 'content/ArticleSort',
    meta: {
      icon: 'file-word-o',
      hidden: false,
      parent: 20000,
    },
  },
  {
    name: '文章管理',
    path: 'ArticleManagement',
    page: 'content/ArticleManagement',
    meta: {
      icon: 'file-text',
      hidden: false,
      parent: 20000,
    },
  },
  {
    name: '公告管理',
    path: 'Anouncement',
    page: 'content/Anouncement',
    meta: {
      icon: 'bullhorn',
      hidden: false,
      parent: 20000,
    },
  },
  {
    name: '图片管理',
    path: 'ImageManage',
    page: 'content/ImageManage',
    meta: {
      icon: 'photo',
      hidden: false,
      parent: 20000,
    },
  },
  {
    name: '用户列表',
    path: 'UserList',
    page: 'user/UserList',
    meta: {
      icon: 'users',
      hidden: false,
      parent: 30000,
    },
  },
  {
    name: '用户设置',
    path: 'UserSetting',
    page: 'user/UserSetting',
    meta: {
      hidden: true,
      parent: 30000,
    },
  },
  {
    name: '冻结用户',
    path: 'FreezeUser',
    page: 'user/FreezeUser',
    meta: {
      icon: 'user-times',
      hidden: false,
      parent: 30000,
    },
  },
  {
    name: '财务明细',
    path: 'FinanceDetail',
    page: 'user/FinanceDetail',
    meta: {
      icon: 'money',
      hidden: false,
      parent: 30000,
    },
  },
  {
    name: '系统设置',
    path: 'Setting',
    page: 'system/Setting',
    meta: {
      icon: 'cog',
      hidden: false,
      parent: 40000,
    },
  },
  {
    name: '数据统计',
    path: 'Statistics',
    page: 'system/Statistics',
    meta: {
      icon: 'bar-chart',
      hidden: false,
      parent: 40000,
    },
  },
  {
    name: '支付设置',
    path: 'Pay',
    page: 'system/Pay',
    meta: {
      icon: 'paypal',
      hidden: false,
      parent: 40000,
    },
  },
  {
    name: '黑名单',
    path: 'BlackList',
    page: 'system/BlackList',
    meta: {
      icon: 'list-alt',
      hidden: false,
      parent: 40000,
    },
  },
  {
    name: '新增黑名单',
    path: 'AddBlack',
    page: 'system/AddBlack',
    meta: {
      icon: 'list-alt',
      hidden: true,
      parent: 40000,
    },
  },
  {
    name: '登录日志',
    path: 'LoginLog',
    page: 'system/LoginLog',
    meta: {
      icon: 'file-text-o',
      hidden: false,
      parent: 40000,
    },
  },
  {
    name: '用户管理',
    path: 'User',
    page: 'admin/User',
    meta: {
      icon: 'list',
      hidden: false,
      parent: 50000,
    },
  },
  {
    name: '新增用户',
    path: 'AddUser',
    page: 'admin/AddUser',
    meta: {
      hidden: true,
      parent: 50000,
    },
  },
  {
    name: '角色管理',
    path: 'Role',
    page: 'admin/Role',
    meta: {
      icon: 'vcard',
      hidden: false,
      parent: 50000,
    },
  },
  {
    name: '新增角色',
    path: 'AddRole',
    page: 'admin/AddRole',
    meta: {
      hidden: true,
      parent: 50000,
    },
  },
  {
    name: '管理日志',
    path: 'ManageLog',
    page: 'admin/ManageLog',
    meta: {
      icon: 'calendar-plus-o',
      hidden: false,
      parent: 50000,
    },
  },
];

const fullRoutes: Array<RouteType> = [{
  name: '首页',
  path: '/Home',
  page: 'Home',
  children: extendRoutes
}];


export {
  menuRoutes,
  extendRoutes,
  fullRoutes,
  RouteType,
}


